package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_audit_zd database table.
 * 
 */
@Entity
@Table(name="per_audit_zd")
@NamedQuery(name="PerAuditZd.findAll", query="SELECT p FROM PerAuditZd p")
public class PerAuditZd implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int ztid;

	private String ztname;

	//bi-directional many-to-one association to PerAuditMdy
	@OneToMany(mappedBy="perAuditZd")
	private List<PerAuditMdy> perAuditMdies;

	//bi-directional many-to-one association to PerAuditTab
	@ManyToOne
	@JoinColumn(name="TABID")
	private PerAuditTab perAuditTab;

	public PerAuditZd() {
	}

	public int getZtid() {
		return this.ztid;
	}

	public void setZtid(int ztid) {
		this.ztid = ztid;
	}

	public String getZtname() {
		return this.ztname;
	}

	public void setZtname(String ztname) {
		this.ztname = ztname;
	}

	public List<PerAuditMdy> getPerAuditMdies() {
		return this.perAuditMdies;
	}

	public void setPerAuditMdies(List<PerAuditMdy> perAuditMdies) {
		this.perAuditMdies = perAuditMdies;
	}

	public PerAuditMdy addPerAuditMdy(PerAuditMdy perAuditMdy) {
		getPerAuditMdies().add(perAuditMdy);
		perAuditMdy.setPerAuditZd(this);

		return perAuditMdy;
	}

	public PerAuditMdy removePerAuditMdy(PerAuditMdy perAuditMdy) {
		getPerAuditMdies().remove(perAuditMdy);
		perAuditMdy.setPerAuditZd(null);

		return perAuditMdy;
	}

	public PerAuditTab getPerAuditTab() {
		return this.perAuditTab;
	}

	public void setPerAuditTab(PerAuditTab perAuditTab) {
		this.perAuditTab = perAuditTab;
	}

}